type Methods = 'get' | 'post'

function test<T extends Methods>(method: T): void {
    console.log(method)
}

test<'get'>('get')
